<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <meta name="author" content="Openshift Assisted Service Team">
  
  <link rel="shortcut icon" href="../img/favicon.ico">
  <title>assisted-service Live ISO - Openshift Assisted Service</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700" />

  <link rel="stylesheet" href="../css/theme.css" />
  <link rel="stylesheet" href="../css/theme_extra.css" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" />
  
  <script>
    // Current page data
    var mkdocs_page_name = "assisted-service Live ISO";
    var mkdocs_page_input_path = "installer-live-iso.md";
    var mkdocs_page_url = null;
  </script>
  
  <script src="../js/jquery-2.1.1.min.js" defer></script>
  <script src="../js/modernizr-2.8.3.min.js" defer></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
  <script>hljs.initHighlightingOnLoad();</script> 
  
</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
    <div class="wy-side-scroll">
      <div class="wy-side-nav-search">
        <a href=".." class="icon icon-home"> Openshift Assisted Service</a>
        <div role="search">
  <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" title="Type search term here" />
  </form>
</div>
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
                <ul>
                    <li class="toctree-l1"><a class="reference internal" href="..">OAS Home</a>
                    </li>
                </ul>
                <p class="caption"><span class="caption-text">OAS Deployment</span></p>
                <ul>
                    <li class="toctree-l1"><a class="reference internal" href="../user-guide/assisted-service-on-local/">OAS Running on Local</a>
                    </li>
                    <li class="toctree-l1"><a class="reference internal" href="../user-guide/assisted-service-on-openshift/">OAS Running on Openshift</a>
                    </li>
                </ul>
                <p class="caption"><span class="caption-text">Openshift Deployment</span></p>
                <ul>
                    <li class="toctree-l1"><a class="reference internal" href="../user-guide/user-guide/">User Guide Index</a>
                    </li>
                    <li class="toctree-l1"><a class="reference internal" href="../user-guide/deploy-on-local/">OCP Deployment on Local</a>
                    </li>
                    <li class="toctree-l1"><a class="reference internal" href="../user-guide/deploy-on-bare-metal/">OCP Deployment on Bare Metal</a>
                    </li>
                    <li class="toctree-l1"><a class="reference internal" href="../user-guide/deploy-on-vsphere/">OCP Deployment on vSphere</a>
                    </li>
                    <li class="toctree-l1"><a class="reference internal" href="../user-guide/deploy-on-RHEV/">OCP Deployment on RHEV</a>
                    </li>
                    <li class="toctree-l1"><a class="reference internal" href="../user-guide/deploy-on-OSP/">OCP Deployment on Openstack</a>
                    </li>
                </ul>
                <p class="caption"><span class="caption-text">OAS Development</span></p>
                <ul>
                    <li class="toctree-l1"><a class="reference internal" href="../dev/migrations/">Migrations</a>
                    </li>
                </ul>
      </div>
    </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="..">Openshift Assisted Service</a>
      </nav>

      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="..">Docs</a> &raquo;</li>
    
      
    
    <li>assisted-service Live ISO</li>
    <li class="wy-breadcrumbs-aside">
      
    </li>
  </ul>
  
  <hr/>
</div>
          <div role="main">
            <div class="section">
              
                <h1 id="assisted-service-live-iso">assisted-service Live ISO</h1>
<p>The assisted-service can be deployed using a live ISO. The live ISO deploys the assisted-service
using containers on RHCOS. The assisted-service live ISO is a RHCOS live ISO that is customized with an ignition config file.</p>
<h2 id="how-to-create-an-assisted-service-live-iso">How to create an assisted-service live ISO</h2>
<h3 id="create-the-ignition-config">Create the ignition config</h3>
<p>A ignition config that deploys the assisted-service is available at 
https://raw.githubusercontent.com/openshift/assisted-service/master/config/onprem-iso-config.ign.</p>
<p>Download this ignition config and modify it to include your ssh public key and your registry.redhat.io pull secret. The example below assumes your pull secret is saved into a file called auth.json.</p>
<pre><code>wget https://raw.githubusercontent.com/openshift/assisted-service/master/config/onprem-iso-config.ign

export SSH_PUBLIC_KEY=$(cat ~/.ssh/id_rsa.pub)
export PULL_SECRET_ENCODED=$(export PULL_SECRET=$(cat auth.json); urlencode $PULL_SECRET)

sed -i 's#replace-with-your-ssh-public-key#'&quot;${SSH_PUBLIC_KEY}&quot;'#' onprem-iso-config.ign
sed -i 's#replace-with-your-urlencoded-pull-secret#'&quot;${PULL_SECRET_ENCODED}&quot;'#' onprem-iso-config.ign
</code></pre>
<p>Currently, the upstream assisted-service container image cannot be used with the live ISO. You will 
need to build a custom container image and push it to quay.io.</p>
<pre><code>export SERVICE=quay.io/&lt;your-org&gt;/assisted-service:latest
make build
docker push ${SERVICE}
</code></pre>
<p>Then update the ignition config file to use your assisted-service container image.</p>
<pre><code>sed -i 's#quay.io/ocpmetal/assisted-service:latest#'&quot;${SERVICE}&quot;'#' onprem-iso-config.ign
</code></pre>
<h3 id="download-the-base-rhcos-live-iso">Download the base RHCOS live ISO</h3>
<p>The base live ISO is extracted from a container image. Run the container
image containing the ISO, copy the ISO, and then stop and remove the container. </p>
<pre><code>podman run --privileged --pull=always --rm \
  -v .:/download -w /download \
  --entrypoint /bin/bash \
  quay.io/ocpmetal/assisted-iso-create:latest cp /data/livecd.iso /download/livecd.iso
</code></pre>
<h3 id="create-the-assisted-service-live-iso">Create the assisted-service live ISO</h3>
<p>Finally, use the ignition config (onprem-iso-config.ign) and the base live ISO (livecd.iso) to
create the assisted-service live ISO.</p>
<pre><code>podman run --rm --privileged  -v /dev:/dev -v /run/udev:/run/udev -v .:/data  \
  quay.io/coreos/coreos-installer:release iso ignition embed -i /data/onprem-iso-config.ign -o /data/assisted-service.iso /data/livecd.iso
</code></pre>
<p>The live ISO, <strong>assisted-service.iso</strong> (not livecd.iso), can then be used to deploy the installer. The live ISO storage system is emphemeral and its size depends on the amount of memory installed on the host. A minimum of 10GB of memory is required to deploy the installer, generate a single discovery ISO, and install an OCP cluster.</p>
<p>After the live ISO boots, the UI should be accessible from the browser at</p>
<pre><code>https://&lt;hostname-or-ip&gt;:8443.
</code></pre>
<p>It may take a couple of minutes for the assisted-service and UI to become ready after you see the login prompt.</p>
<h2 id="how-to-debug">How to debug</h2>
<p>Login to the host using your ssh private key.</p>
<p>The assisted-service components are deployed as systemd services.
* assisted-service-installer.service
* assisted-service-db.service
* assisted-service-ui.service</p>
<p>Verify that the containers deploy by those services are running.</p>
<pre><code>sudo podman ps -a
</code></pre>
<p>Examine the assisted-service-installer.service logs:</p>
<pre><code>sudo journalctl -f -u assisted-service-installer.service
</code></pre>
<p>The environment file used to deploy the assisted-service is located at /etc/assisted-service/environment.</p>
<p>Pull secrets are saved to a file located at /etc/assisted-service/auth.json.</p>
<h2 id="how-to-use-the-fcc-file-to-generate-the-base-ignition-config-file">How to use the FCC file to generate the base ignition config file</h2>
<p>The ignition file is created using a predefined Fedore CoreOS Config (FCC) file provided in /config/onprem-iso-fcc.yaml. FCC files are easier to read and edit than the machine readable ignition files.</p>
<p>The FCC file transpiles to an ignition config using:</p>
<pre><code>podman run --rm -v ./config/onprem-iso-fcc.yaml:/config.fcc:z quay.io/coreos/fcct:release --pretty --strict /config.fcc &gt; onprem-iso-config.ign
</code></pre>
<p>There is also a make target that you can use, which wraps the above command to generate the ignition file:</p>
<pre><code>make generate-onprem-iso-ignition
</code></pre>
              
            </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <!-- Copyright etc -->
    
  </div>

  Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
      
        </div>
      </div>

    </section>

  </div>

  <div class="rst-versions" role="note" aria-label="versions">
    <span class="rst-current-version" data-toggle="rst-current-version">
      
          <a href="https://github.com/openshift/assisted-service" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
      
      
      
    </span>
</div>
    <script>var base_url = '..';</script>
    <script src="../js/theme.js" defer></script>
      <script src="../search/main.js" defer></script>
    <script defer>
        window.onload = function () {
            SphinxRtdTheme.Navigation.enable(true);
        };
    </script>

</body>
</html>
